<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title"  class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('作者')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-author"  class="form-control" name="row[author]" type="text" value="{$row.author|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-url" class="form-control" name="row[url]" type="text" value="{$row.url|htmlentities}">
        </div>
    </div>
            <div class="form-group">
            <label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('列表图片')}:</label>
            <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <input id="c-image" class="form-control" size="35" name="row[list_image]" type="text" value="{$row.list_image}">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                        <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                    </div>
                    <span class="msg-box n-right"></span>
                </div>
                <ul class="row list-inline faupload-preview" id="p-image"></ul>
            </div>
        </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="textarea" value="{$row.images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id"  data-source="category/selectpage" class="form-control selectpage" name="row[category_id]" type="text" value="{$row.category_id|htmlentities}">
        </div>
    </div>
    {if condition="$isshow eq 1"}
    <div class="form-group ">
        <label for="c-newpid" class="control-label col-xs-12 col-sm-2">{:__('审核1')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-newpid"  class="form-control selectpicker" name="row[is_show]" onchange="snew(this)">
                <option value="0"  {in name="0" value="$row.is_show"}selected{/in}>审核中</option>
                
                <option value="1" {in name="1" value="$row.is_show"}selected{/in}>通过</option>
                 <option value="2" {in name="2" value="$row.is_show"}selected{/in}>不通过</option>
            </select>

        </div>
    </div>
    <div class="form-group mytext">
        <label class="control-label col-xs-12 col-sm-2">{:__('拒绝理由')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-refuse"  class="form-control" name="row[refuse]" type="text" value="{$row.refuse|htmlentities}">
        </div>
    </div>
    {else /}
        {if condition ="$row.is_show eq 2"}
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('拒绝理由')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-refuse1" disabled="disabled"  class="form-control" name="row[refuse]" type="text" value="{$row.refuse|htmlentities}">
            </div>
        </div>
        {/if}
    {/if}
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script type="text/javascript">
    function snew(that){
        if($(that).val() == 1){
            $('.mytext').css('display','none');
//            console.log($('.days').val());die;
            // $('.mytext').css('display','block');
        }else{
            console.log(22);
            $('.mytext').css('display','block');
            
        }
    }
</script>